<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <title>卖家商品页面</title>
	<style>
		#page_end{
			float:left;
			width:300px;
			height:50px;
			/* margin: 0 auto; */
			margin-left:400px;
		}
		.page_style{
			width:50px;
			height:30px;
			background-color:#3477c8;
			float:left;
			margin-left:10px;
			margin-top:10px;
			margin-bottom:10px;
			text-align:center;
			line-height:30px;
		}
		.page_style a{
			color:white;
			font-size:14px;
	
		}
	</style>
</head>
<body>
<?php 
	include_once("common/init.php");
	include_once("header.php");
	$whereSql = "userid=".$_REQUEST["userid"]." and isno=0  ";
	if ($_REQUEST["categoryid"]){
		$whereSql .= " and categoryid=" . $_REQUEST["categoryid"];
	}
	if ($_REQUEST["title"]) {
		$whereSql .= " and title like '%". $_REQUEST["title"] ."%' ";
	}
	// $page = $_REQUEST["page"]?$_REQUEST["page"]:"1";
	$list= db_get_all("select * from goods where $whereSql order by id desc");
	$cat_title = db_get_val("user",$_REQUEST["userid"],"nickname");
?>
<div class="m_ctr">
	<div class="ej_tctr">
		当前位置：<a href="index.php">首页</a> > <?php echo $cat_title;?>
	</div>
	<div class="ej_tctr1">
		<div class="ej_t1">
            <div class="floatleft"></div>
            <div class='l_tcell'>
				用户：<?php echo db_get_val("user",$_REQUEST["userid"],"nickname");?> &nbsp;&nbsp;电话:<?php echo db_get_val("user",$_REQUEST["userid"],"tel");?> 
			</div>
        </div>
    </div>
    <div class="m_ctr1">
        <?php 
			$i=1;
		foreach($list as $row) {?>
		<div class="m_pctr1" onMouseOver="document.getElementById('x<?php echo $i;?>').className='m_pic11'" onMouseOut="document.getElementById('x<?php echo $i;?>').className='m_pic1'"  <?php if(is_int($i/4)){?> style="margin-right:0;"<?php }?>>
            <div class="m_pic1" id="x<?php echo $i;?>">
				<a href="goodsshow.php?id=<?php echo $row['id'];?>&categoryid=<?php echo $row['categoryid'];?>">
					<img src="./Public/Upload/<?php echo $row["img"];?>">
				</a>
			</div>
            <div class="m_pt11">
				<a href="goodsshow.php?id=<?php echo $row['id'];?>&categoryid=<?php echo $row['categoryid'];?>">
					<?php echo $row['title'];?>
				</a>
			</div>
            <div class="m_pt12"><span>￥<?php echo $row['mprice'];?></span>&emsp;￥<?php echo $row['sprice'];?></div>
        </div>
        <?php 
		$i = $i+1; 
		}?>
    </div>
</div>
<?php include_once("footer.php");?>
</body>
</html>